// custom-nav-bar/custom-nav-bar.js
const app = getApp()
Component({
  /**
   * Component properties
   */
  properties: {
    title: String,
    color: String,
    isBack: Boolean,
    homePage:Boolean,
    textColor:Boolean
  },

  /**
   * Component initial data
   */
  data: {
    statusBarHeight: 0
  },
  attached: function () {
    // 在组件实例进入页面节点树时执行
    wx.getSystemInfo({
      success: (res) => {
        this.setData({
          statusBarHeight: res.statusBarHeight
        })
      }
    })
  },
  /**
   * Component methods
   */
  methods: {
    onClickBack(event) {
      wx.navigateBack()
    }
  }
})
